﻿using System;
using System.ComponentModel;

namespace HalconDotNet
{
	/// <summary>Represents an instance of an image acquisition device.</summary>
	// Token: 0x0200003C RID: 60
	public class HFramegrabber : HHandle
	{
		// Token: 0x06000568 RID: 1384 RVA: 0x0000883B File Offset: 0x00006A3B
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HFramegrabber() : base(HHandleBase.UNDEF)
		{
		}

		// Token: 0x06000569 RID: 1385 RVA: 0x0001F15E File Offset: 0x0001D35E
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HFramegrabber(IntPtr handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x0600056A RID: 1386 RVA: 0x0001F16D File Offset: 0x0001D36D
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HFramegrabber(HHandle handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x0600056B RID: 1387 RVA: 0x0001F17C File Offset: 0x0001D37C
		private void AssertSemType()
		{
			base.AssertSemType("framegrabber");
		}

		// Token: 0x0600056C RID: 1388 RVA: 0x0001F189 File Offset: 0x0001D389
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HFramegrabber obj)
		{
			obj = new HFramegrabber(HHandleBase.UNDEF);
			return obj.Load(proc, parIndex, err);
		}

		// Token: 0x0600056D RID: 1389 RVA: 0x0001F1A4 File Offset: 0x0001D3A4
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HFramegrabber[] obj)
		{
			HTuple htuple;
			err = HTuple.LoadNew(proc, parIndex, err, out htuple);
			obj = new HFramegrabber[htuple.Length];
			for (int i = 0; i < htuple.Length; i++)
			{
				obj[i] = new HFramegrabber(HalconAPI.IsLegacyHandleMode() ? htuple[i].IP : htuple[i].H);
			}
			htuple.Dispose();
			return err;
		}

		/// <summary>
		///   Open and configure an image acquisition device.
		///   Modified instance represents: Handle of the opened image acquisition device.
		/// </summary>
		/// <param name="name">HALCON image acquisition interface name, i.e., name of the corresponding DLL (Windows) or shared library (Linux/macOS). Default: "File"</param>
		/// <param name="horizontalResolution">Desired horizontal resolution of image acquisition interface (absolute value or 1 for full resolution, 2 for half resolution, or 4 for quarter resolution). Default: 1</param>
		/// <param name="verticalResolution">Desired vertical resolution of image acquisition interface (absolute value or 1 for full resolution, 2 for half resolution, or 4 for quarter resolution). Default: 1</param>
		/// <param name="imageWidth">Width of desired image part (absolute value or 0 for HorizontalResolution - 2*StartColumn). Default: 0</param>
		/// <param name="imageHeight">Height of desired image part (absolute value or 0 for VerticalResolution - 2*StartRow). Default: 0</param>
		/// <param name="startRow">Line number of upper left corner of desired image part (or border height if ImageHeight = 0). Default: 0</param>
		/// <param name="startColumn">Column number of upper left corner of desired image part (or border width if ImageWidth = 0). Default: 0</param>
		/// <param name="field">Desired half image or full image. Default: "default"</param>
		/// <param name="bitsPerChannel">Number of transferred bits per pixel and image channel (-1: device-specific default value). Default: -1</param>
		/// <param name="colorSpace">Output color format of the grabbed images, typically 'gray' or 'raw' for single-channel or 'rgb' or 'yuv' for three-channel images ('default': device-specific default value). Default: "default"</param>
		/// <param name="generic">Generic parameter with device-specific meaning. Default: -1</param>
		/// <param name="externalTrigger">External triggering. Default: "default"</param>
		/// <param name="cameraType">Type of used camera ('default': device-specific default value). Default: "default"</param>
		/// <param name="device">Device the image acquisition device is connected to ('default': device-specific default value). Default: "default"</param>
		/// <param name="port">Port the image acquisition device is connected to (-1: device-specific default value). Default: -1</param>
		/// <param name="lineIn">Camera input line of multiplexer (-1: device-specific default value). Default: -1</param>
		// Token: 0x0600056E RID: 1390 RVA: 0x0001F214 File Offset: 0x0001D414
		public HFramegrabber(string name, int horizontalResolution, int verticalResolution, int imageWidth, int imageHeight, int startRow, int startColumn, string field, HTuple bitsPerChannel, HTuple colorSpace, HTuple generic, string externalTrigger, HTuple cameraType, HTuple device, HTuple port, HTuple lineIn)
		{
			IntPtr proc = HalconAPI.PreCall(2037);
			HalconAPI.StoreS(proc, 0, name);
			HalconAPI.StoreI(proc, 1, horizontalResolution);
			HalconAPI.StoreI(proc, 2, verticalResolution);
			HalconAPI.StoreI(proc, 3, imageWidth);
			HalconAPI.StoreI(proc, 4, imageHeight);
			HalconAPI.StoreI(proc, 5, startRow);
			HalconAPI.StoreI(proc, 6, startColumn);
			HalconAPI.StoreS(proc, 7, field);
			HalconAPI.Store(proc, 8, bitsPerChannel);
			HalconAPI.Store(proc, 9, colorSpace);
			HalconAPI.Store(proc, 10, generic);
			HalconAPI.StoreS(proc, 11, externalTrigger);
			HalconAPI.Store(proc, 12, cameraType);
			HalconAPI.Store(proc, 13, device);
			HalconAPI.Store(proc, 14, port);
			HalconAPI.Store(proc, 15, lineIn);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(bitsPerChannel);
			HalconAPI.UnpinTuple(colorSpace);
			HalconAPI.UnpinTuple(generic);
			HalconAPI.UnpinTuple(cameraType);
			HalconAPI.UnpinTuple(device);
			HalconAPI.UnpinTuple(port);
			HalconAPI.UnpinTuple(lineIn);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Open and configure an image acquisition device.
		///   Modified instance represents: Handle of the opened image acquisition device.
		/// </summary>
		/// <param name="name">HALCON image acquisition interface name, i.e., name of the corresponding DLL (Windows) or shared library (Linux/macOS). Default: "File"</param>
		/// <param name="horizontalResolution">Desired horizontal resolution of image acquisition interface (absolute value or 1 for full resolution, 2 for half resolution, or 4 for quarter resolution). Default: 1</param>
		/// <param name="verticalResolution">Desired vertical resolution of image acquisition interface (absolute value or 1 for full resolution, 2 for half resolution, or 4 for quarter resolution). Default: 1</param>
		/// <param name="imageWidth">Width of desired image part (absolute value or 0 for HorizontalResolution - 2*StartColumn). Default: 0</param>
		/// <param name="imageHeight">Height of desired image part (absolute value or 0 for VerticalResolution - 2*StartRow). Default: 0</param>
		/// <param name="startRow">Line number of upper left corner of desired image part (or border height if ImageHeight = 0). Default: 0</param>
		/// <param name="startColumn">Column number of upper left corner of desired image part (or border width if ImageWidth = 0). Default: 0</param>
		/// <param name="field">Desired half image or full image. Default: "default"</param>
		/// <param name="bitsPerChannel">Number of transferred bits per pixel and image channel (-1: device-specific default value). Default: -1</param>
		/// <param name="colorSpace">Output color format of the grabbed images, typically 'gray' or 'raw' for single-channel or 'rgb' or 'yuv' for three-channel images ('default': device-specific default value). Default: "default"</param>
		/// <param name="generic">Generic parameter with device-specific meaning. Default: -1</param>
		/// <param name="externalTrigger">External triggering. Default: "default"</param>
		/// <param name="cameraType">Type of used camera ('default': device-specific default value). Default: "default"</param>
		/// <param name="device">Device the image acquisition device is connected to ('default': device-specific default value). Default: "default"</param>
		/// <param name="port">Port the image acquisition device is connected to (-1: device-specific default value). Default: -1</param>
		/// <param name="lineIn">Camera input line of multiplexer (-1: device-specific default value). Default: -1</param>
		// Token: 0x0600056F RID: 1391 RVA: 0x0001F320 File Offset: 0x0001D520
		public HFramegrabber(string name, int horizontalResolution, int verticalResolution, int imageWidth, int imageHeight, int startRow, int startColumn, string field, int bitsPerChannel, string colorSpace, double generic, string externalTrigger, string cameraType, string device, int port, int lineIn)
		{
			IntPtr proc = HalconAPI.PreCall(2037);
			HalconAPI.StoreS(proc, 0, name);
			HalconAPI.StoreI(proc, 1, horizontalResolution);
			HalconAPI.StoreI(proc, 2, verticalResolution);
			HalconAPI.StoreI(proc, 3, imageWidth);
			HalconAPI.StoreI(proc, 4, imageHeight);
			HalconAPI.StoreI(proc, 5, startRow);
			HalconAPI.StoreI(proc, 6, startColumn);
			HalconAPI.StoreS(proc, 7, field);
			HalconAPI.StoreI(proc, 8, bitsPerChannel);
			HalconAPI.StoreS(proc, 9, colorSpace);
			HalconAPI.StoreD(proc, 10, generic);
			HalconAPI.StoreS(proc, 11, externalTrigger);
			HalconAPI.StoreS(proc, 12, cameraType);
			HalconAPI.StoreS(proc, 13, device);
			HalconAPI.StoreI(proc, 14, port);
			HalconAPI.StoreI(proc, 15, lineIn);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Query specific parameters of an image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="param">Parameter of interest. Default: "revision"</param>
		/// <returns>Parameter value.</returns>
		// Token: 0x06000570 RID: 1392 RVA: 0x0001F3F8 File Offset: 0x0001D5F8
		public HTuple GetFramegrabberParam(HTuple param)
		{
			IntPtr proc = HalconAPI.PreCall(2025);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, param);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(param);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Query specific parameters of an image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="param">Parameter of interest. Default: "revision"</param>
		/// <returns>Parameter value.</returns>
		// Token: 0x06000571 RID: 1393 RVA: 0x0001F450 File Offset: 0x0001D650
		public HTuple GetFramegrabberParam(string param)
		{
			IntPtr proc = HalconAPI.PreCall(2025);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, param);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Set specific parameters of an image acquistion device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="param">Parameter name.</param>
		/// <param name="value">Parameter value to be set.</param>
		// Token: 0x06000572 RID: 1394 RVA: 0x0001F4A0 File Offset: 0x0001D6A0
		public void SetFramegrabberParam(HTuple param, HTuple value)
		{
			IntPtr proc = HalconAPI.PreCall(2026);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, param);
			HalconAPI.Store(proc, 2, value);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(param);
			HalconAPI.UnpinTuple(value);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set specific parameters of an image acquistion device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="param">Parameter name.</param>
		/// <param name="value">Parameter value to be set.</param>
		// Token: 0x06000573 RID: 1395 RVA: 0x0001F4F0 File Offset: 0x0001D6F0
		public void SetFramegrabberParam(string param, string value)
		{
			IntPtr proc = HalconAPI.PreCall(2026);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, param);
			HalconAPI.StoreS(proc, 2, value);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Query callback function of an image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="callbackType">Callback type. Default: "transfer_end"</param>
		/// <param name="userContext">Pointer to user-specific context data.</param>
		/// <returns>Pointer to the callback function.</returns>
		// Token: 0x06000574 RID: 1396 RVA: 0x0001F534 File Offset: 0x0001D734
		public IntPtr GetFramegrabberCallback(string callbackType, out IntPtr userContext)
		{
			IntPtr proc = HalconAPI.PreCall(2027);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, callbackType);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			IntPtr result;
			num = HalconAPI.LoadIP(proc, 0, num, out result);
			num = HalconAPI.LoadIP(proc, 1, num, out userContext);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Register a callback function for an image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="callbackType">Callback type. Default: "transfer_end"</param>
		/// <param name="callbackFunction">Pointer to the callback function to be set.</param>
		/// <param name="userContext">Pointer to user-specific context data.</param>
		// Token: 0x06000575 RID: 1397 RVA: 0x0001F598 File Offset: 0x0001D798
		public void SetFramegrabberCallback(string callbackType, IntPtr callbackFunction, IntPtr userContext)
		{
			IntPtr proc = HalconAPI.PreCall(2028);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, callbackType);
			HalconAPI.StoreIP(proc, 2, callbackFunction);
			HalconAPI.StoreIP(proc, 3, userContext);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Asynchronous grab of images and preprocessed image data from the specified image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="region">Pre-processed image regions.</param>
		/// <param name="contours">Pre-processed XLD contours.</param>
		/// <param name="maxDelay">Maximum tolerated delay between the start of the asynchronous grab and the delivery of the image [ms]. Default: -1.0</param>
		/// <param name="data">Pre-processed control data.</param>
		/// <returns>Grabbed image data.</returns>
		// Token: 0x06000576 RID: 1398 RVA: 0x0001F5E4 File Offset: 0x0001D7E4
		public HImage GrabDataAsync(out HRegion region, out HXLDCont contours, double maxDelay, out HTuple data)
		{
			IntPtr proc = HalconAPI.PreCall(2029);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, maxDelay);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HImage result;
			num = HImage.LoadNew(proc, 1, num, out result);
			num = HRegion.LoadNew(proc, 2, num, out region);
			num = HXLDCont.LoadNew(proc, 3, num, out contours);
			num = HTuple.LoadNew(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Asynchronous grab of images and preprocessed image data from the specified image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="region">Pre-processed image regions.</param>
		/// <param name="contours">Pre-processed XLD contours.</param>
		/// <param name="maxDelay">Maximum tolerated delay between the start of the asynchronous grab and the delivery of the image [ms]. Default: -1.0</param>
		/// <param name="data">Pre-processed control data.</param>
		/// <returns>Grabbed image data.</returns>
		// Token: 0x06000577 RID: 1399 RVA: 0x0001F66C File Offset: 0x0001D86C
		public HImage GrabDataAsync(out HRegion region, out HXLDCont contours, double maxDelay, out string data)
		{
			IntPtr proc = HalconAPI.PreCall(2029);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, maxDelay);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HImage result;
			num = HImage.LoadNew(proc, 1, num, out result);
			num = HRegion.LoadNew(proc, 2, num, out region);
			num = HXLDCont.LoadNew(proc, 3, num, out contours);
			num = HalconAPI.LoadS(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Synchronous grab of images and preprocessed image data from the specified image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="region">Preprocessed image regions.</param>
		/// <param name="contours">Preprocessed XLD contours.</param>
		/// <param name="data">Preprocessed control data.</param>
		/// <returns>Grabbed image data.</returns>
		// Token: 0x06000578 RID: 1400 RVA: 0x0001F6F4 File Offset: 0x0001D8F4
		public HImage GrabData(out HRegion region, out HXLDCont contours, out HTuple data)
		{
			IntPtr proc = HalconAPI.PreCall(2030);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HImage result;
			num = HImage.LoadNew(proc, 1, num, out result);
			num = HRegion.LoadNew(proc, 2, num, out region);
			num = HXLDCont.LoadNew(proc, 3, num, out contours);
			num = HTuple.LoadNew(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Synchronous grab of images and preprocessed image data from the specified image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="region">Preprocessed image regions.</param>
		/// <param name="contours">Preprocessed XLD contours.</param>
		/// <param name="data">Preprocessed control data.</param>
		/// <returns>Grabbed image data.</returns>
		// Token: 0x06000579 RID: 1401 RVA: 0x0001F774 File Offset: 0x0001D974
		public HImage GrabData(out HRegion region, out HXLDCont contours, out string data)
		{
			IntPtr proc = HalconAPI.PreCall(2030);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HImage result;
			num = HImage.LoadNew(proc, 1, num, out result);
			num = HRegion.LoadNew(proc, 2, num, out region);
			num = HXLDCont.LoadNew(proc, 3, num, out contours);
			num = HalconAPI.LoadS(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Asynchronous grab of an image from the specified image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="maxDelay">Maximum tolerated delay between the start of the asynchronous grab and the delivery of the image [ms]. Default: -1.0</param>
		/// <returns>Grabbed image.</returns>
		// Token: 0x0600057A RID: 1402 RVA: 0x0001F7F4 File Offset: 0x0001D9F4
		public HImage GrabImageAsync(double maxDelay)
		{
			IntPtr proc = HalconAPI.PreCall(2031);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, maxDelay);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HImage result;
			num = HImage.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Start an asynchronous grab from the specified image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="maxDelay">This parameter is obsolete and has no effect. Default: -1.0</param>
		// Token: 0x0600057B RID: 1403 RVA: 0x0001F844 File Offset: 0x0001DA44
		public void GrabImageStart(double maxDelay)
		{
			IntPtr proc = HalconAPI.PreCall(2032);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, maxDelay);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Synchronous grab of an image from the specified image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <returns>Grabbed image.</returns>
		// Token: 0x0600057C RID: 1404 RVA: 0x0001F880 File Offset: 0x0001DA80
		public HImage GrabImage()
		{
			IntPtr proc = HalconAPI.PreCall(2033);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HImage result;
			num = HImage.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Close specified image acquisition device.
		///   Instance represents: Handle of the image acquisition device to be closed.
		/// </summary>
		// Token: 0x0600057D RID: 1405 RVA: 0x0001F8C8 File Offset: 0x0001DAC8
		public void CloseFramegrabber()
		{
			IntPtr proc = HalconAPI.PreCall(2036);
			base.Store(proc, 0);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Open and configure an image acquisition device.
		///   Modified instance represents: Handle of the opened image acquisition device.
		/// </summary>
		/// <param name="name">HALCON image acquisition interface name, i.e., name of the corresponding DLL (Windows) or shared library (Linux/macOS). Default: "File"</param>
		/// <param name="horizontalResolution">Desired horizontal resolution of image acquisition interface (absolute value or 1 for full resolution, 2 for half resolution, or 4 for quarter resolution). Default: 1</param>
		/// <param name="verticalResolution">Desired vertical resolution of image acquisition interface (absolute value or 1 for full resolution, 2 for half resolution, or 4 for quarter resolution). Default: 1</param>
		/// <param name="imageWidth">Width of desired image part (absolute value or 0 for HorizontalResolution - 2*StartColumn). Default: 0</param>
		/// <param name="imageHeight">Height of desired image part (absolute value or 0 for VerticalResolution - 2*StartRow). Default: 0</param>
		/// <param name="startRow">Line number of upper left corner of desired image part (or border height if ImageHeight = 0). Default: 0</param>
		/// <param name="startColumn">Column number of upper left corner of desired image part (or border width if ImageWidth = 0). Default: 0</param>
		/// <param name="field">Desired half image or full image. Default: "default"</param>
		/// <param name="bitsPerChannel">Number of transferred bits per pixel and image channel (-1: device-specific default value). Default: -1</param>
		/// <param name="colorSpace">Output color format of the grabbed images, typically 'gray' or 'raw' for single-channel or 'rgb' or 'yuv' for three-channel images ('default': device-specific default value). Default: "default"</param>
		/// <param name="generic">Generic parameter with device-specific meaning. Default: -1</param>
		/// <param name="externalTrigger">External triggering. Default: "default"</param>
		/// <param name="cameraType">Type of used camera ('default': device-specific default value). Default: "default"</param>
		/// <param name="device">Device the image acquisition device is connected to ('default': device-specific default value). Default: "default"</param>
		/// <param name="port">Port the image acquisition device is connected to (-1: device-specific default value). Default: -1</param>
		/// <param name="lineIn">Camera input line of multiplexer (-1: device-specific default value). Default: -1</param>
		// Token: 0x0600057E RID: 1406 RVA: 0x0001F8FC File Offset: 0x0001DAFC
		public void OpenFramegrabber(string name, int horizontalResolution, int verticalResolution, int imageWidth, int imageHeight, int startRow, int startColumn, string field, HTuple bitsPerChannel, HTuple colorSpace, HTuple generic, string externalTrigger, HTuple cameraType, HTuple device, HTuple port, HTuple lineIn)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(2037);
			HalconAPI.StoreS(proc, 0, name);
			HalconAPI.StoreI(proc, 1, horizontalResolution);
			HalconAPI.StoreI(proc, 2, verticalResolution);
			HalconAPI.StoreI(proc, 3, imageWidth);
			HalconAPI.StoreI(proc, 4, imageHeight);
			HalconAPI.StoreI(proc, 5, startRow);
			HalconAPI.StoreI(proc, 6, startColumn);
			HalconAPI.StoreS(proc, 7, field);
			HalconAPI.Store(proc, 8, bitsPerChannel);
			HalconAPI.Store(proc, 9, colorSpace);
			HalconAPI.Store(proc, 10, generic);
			HalconAPI.StoreS(proc, 11, externalTrigger);
			HalconAPI.Store(proc, 12, cameraType);
			HalconAPI.Store(proc, 13, device);
			HalconAPI.Store(proc, 14, port);
			HalconAPI.Store(proc, 15, lineIn);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(bitsPerChannel);
			HalconAPI.UnpinTuple(colorSpace);
			HalconAPI.UnpinTuple(generic);
			HalconAPI.UnpinTuple(cameraType);
			HalconAPI.UnpinTuple(device);
			HalconAPI.UnpinTuple(port);
			HalconAPI.UnpinTuple(lineIn);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Open and configure an image acquisition device.
		///   Modified instance represents: Handle of the opened image acquisition device.
		/// </summary>
		/// <param name="name">HALCON image acquisition interface name, i.e., name of the corresponding DLL (Windows) or shared library (Linux/macOS). Default: "File"</param>
		/// <param name="horizontalResolution">Desired horizontal resolution of image acquisition interface (absolute value or 1 for full resolution, 2 for half resolution, or 4 for quarter resolution). Default: 1</param>
		/// <param name="verticalResolution">Desired vertical resolution of image acquisition interface (absolute value or 1 for full resolution, 2 for half resolution, or 4 for quarter resolution). Default: 1</param>
		/// <param name="imageWidth">Width of desired image part (absolute value or 0 for HorizontalResolution - 2*StartColumn). Default: 0</param>
		/// <param name="imageHeight">Height of desired image part (absolute value or 0 for VerticalResolution - 2*StartRow). Default: 0</param>
		/// <param name="startRow">Line number of upper left corner of desired image part (or border height if ImageHeight = 0). Default: 0</param>
		/// <param name="startColumn">Column number of upper left corner of desired image part (or border width if ImageWidth = 0). Default: 0</param>
		/// <param name="field">Desired half image or full image. Default: "default"</param>
		/// <param name="bitsPerChannel">Number of transferred bits per pixel and image channel (-1: device-specific default value). Default: -1</param>
		/// <param name="colorSpace">Output color format of the grabbed images, typically 'gray' or 'raw' for single-channel or 'rgb' or 'yuv' for three-channel images ('default': device-specific default value). Default: "default"</param>
		/// <param name="generic">Generic parameter with device-specific meaning. Default: -1</param>
		/// <param name="externalTrigger">External triggering. Default: "default"</param>
		/// <param name="cameraType">Type of used camera ('default': device-specific default value). Default: "default"</param>
		/// <param name="device">Device the image acquisition device is connected to ('default': device-specific default value). Default: "default"</param>
		/// <param name="port">Port the image acquisition device is connected to (-1: device-specific default value). Default: -1</param>
		/// <param name="lineIn">Camera input line of multiplexer (-1: device-specific default value). Default: -1</param>
		// Token: 0x0600057F RID: 1407 RVA: 0x0001FA08 File Offset: 0x0001DC08
		public void OpenFramegrabber(string name, int horizontalResolution, int verticalResolution, int imageWidth, int imageHeight, int startRow, int startColumn, string field, int bitsPerChannel, string colorSpace, double generic, string externalTrigger, string cameraType, string device, int port, int lineIn)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(2037);
			HalconAPI.StoreS(proc, 0, name);
			HalconAPI.StoreI(proc, 1, horizontalResolution);
			HalconAPI.StoreI(proc, 2, verticalResolution);
			HalconAPI.StoreI(proc, 3, imageWidth);
			HalconAPI.StoreI(proc, 4, imageHeight);
			HalconAPI.StoreI(proc, 5, startRow);
			HalconAPI.StoreI(proc, 6, startColumn);
			HalconAPI.StoreS(proc, 7, field);
			HalconAPI.StoreI(proc, 8, bitsPerChannel);
			HalconAPI.StoreS(proc, 9, colorSpace);
			HalconAPI.StoreD(proc, 10, generic);
			HalconAPI.StoreS(proc, 11, externalTrigger);
			HalconAPI.StoreS(proc, 12, cameraType);
			HalconAPI.StoreS(proc, 13, device);
			HalconAPI.StoreI(proc, 14, port);
			HalconAPI.StoreI(proc, 15, lineIn);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Query look-up table of the image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="imageRed">Red level of the LUT entries.</param>
		/// <param name="imageGreen">Green level of the LUT entries.</param>
		/// <param name="imageBlue">Blue level of the LUT entries.</param>
		// Token: 0x06000580 RID: 1408 RVA: 0x0001FAE0 File Offset: 0x0001DCE0
		public void GetFramegrabberLut(out HTuple imageRed, out HTuple imageGreen, out HTuple imageBlue)
		{
			IntPtr proc = HalconAPI.PreCall(2038);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			num = HTuple.LoadNew(proc, 0, HTupleType.INTEGER, num, out imageRed);
			num = HTuple.LoadNew(proc, 1, HTupleType.INTEGER, num, out imageGreen);
			num = HTuple.LoadNew(proc, 2, HTupleType.INTEGER, num, out imageBlue);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Set look-up table of the image acquisition device.
		///   Instance represents: Handle of the acquisition device to be used.
		/// </summary>
		/// <param name="imageRed">Red level of the LUT entries.</param>
		/// <param name="imageGreen">Green level of the LUT entries.</param>
		/// <param name="imageBlue">Blue level of the LUT entries.</param>
		// Token: 0x06000581 RID: 1409 RVA: 0x0001FB50 File Offset: 0x0001DD50
		public void SetFramegrabberLut(HTuple imageRed, HTuple imageGreen, HTuple imageBlue)
		{
			IntPtr proc = HalconAPI.PreCall(2039);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, imageRed);
			HalconAPI.Store(proc, 2, imageGreen);
			HalconAPI.Store(proc, 3, imageBlue);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(imageRed);
			HalconAPI.UnpinTuple(imageGreen);
			HalconAPI.UnpinTuple(imageBlue);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}
	}
}
